﻿using System.Web.Mvc;

namespace Krupa.Pro.Web.Utility.Caching
{
    public class RemoveHeaderAttribute:ActionFilterAttribute
    {
        private string Header { get; set; }
        public RemoveHeaderAttribute(string header)
        {
            Header = header;
        }


        public override void OnResultExecuted(ResultExecutedContext filterContext)
        {
            base.OnResultExecuted(filterContext);
            filterContext.HttpContext.Response.Headers.Remove(Header);
        }
    }
}